package com.rcnss.ui.form;

import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.SplitPanel;
import com.vaadin.ui.VerticalLayout;

public abstract class AbstractForm extends CustomComponent{

    private static final long serialVersionUID = 1L;

    public SplitPanel splitPanel = new SplitPanel();
    protected VerticalLayout root = new VerticalLayout();
    protected HorizontalLayout rootTop = new HorizontalLayout();
    protected HorizontalLayout top = new HorizontalLayout();
    public VerticalLayout body = new VerticalLayout();
    protected HorizontalLayout bottom = new HorizontalLayout();
    protected VerticalLayout left = new VerticalLayout();

    public void initLayout() {
        this.setSizeFull();
        this.setCompositionRoot(this.root);
        this.bottom.setWidth("100%");

        this.splitPanel.setOrientation(SplitPanel.ORIENTATION_HORIZONTAL);
        this.setSizeFull();

        this.body.setSizeFull();
        this.body.addComponent(this.splitPanel);

        this.root.setSizeFull();

        this.rootTop.setWidth("100%");
        this.root.addComponent(this.rootTop);
        this.root.addComponent(this.body);
        this.root.addComponent(this.bottom);
        this.root.setExpandRatio(this.body, 1.0f);
    }
	
}
